view_set_wport


描述

此函数用来返回给定可视区域的宽度。你需要给出可视区域的索引(从0到7)和你所希望设置的宽度。


语法:

view_set_wport(view_port, w)


参数:

参数 描述
view_port The view port to target (0 - 7)
w The new width (in pixels)


返回:

Real(实数)


例如:

if view_get_wport(0) != (display_get_width () / 2)
   {
   view_set_wport(0, display_get_width() / 2);
   }

上述代码检查view port[0]的宽度,如果它不是展示窗口宽度一半,就将前者设为后者的一半。


上一页: Cameras
下一页: view_set_hport
© Copyright YoYo Games Ltd. 2018 All Rights Reserved